home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / ASSEMBLE / 2593.ZIP / ELINK.ZIP / MANUAL.TXT < prev    next >
Text File  |  1990-10-06  |  77KB  |  2,490 lines

  1.  
  2.  
  3.                           Table of Contents
  4.  
  5.  
  6. ELINK.....................................................3
  7.     What a linker does....................................3
  8.     How object files are constructed......................4
  9.         Standard Object Module Records....................4
  10.             BLKDEF........................................4
  11.             BLKEND........................................4
  12.             COMENT........................................5
  13.             DEBSYM........................................5
  14.             EXTDEF........................................5
  15.             FIXUPP........................................6
  16.             GRPDEF........................................8
  17.             LEDATA........................................9
  18.             LIDATA........................................9
  19.             LINNUM.......................................10
  20.             LNAMES.......................................10
  21.             MODEND.......................................11
  22.             PUBDEF.......................................12
  23.             SEGDEF.......................................12
  24.             THEADR.......................................13
  25.             TYPDEF.......................................13
  26.         Microsoft Enhancements to OMF....................14
  27.             COMDEF.......................................14
  28.             LCOMDEF......................................14
  29.             LEXTDEF......................................14
  30.             LPUBDEF......................................15
  31.         32-bit Enhancements to OMF.......................15
  32.             PharLap 32-bit Enhancements..................15
  33.                 FIXUPP...................................15
  34.                 LEDATA...................................15
  35.                 LIDATA...................................16
  36.                 LINNUM...................................16
  37.                 MODEND...................................16
  38.                 PUBDEF...................................16
  39.                 SEGDEF...................................16
  40.             Microsoft 32-bit Enhancements................17
  41.                 FIXUPP...................................17
  42.                 LEDATA...................................17
  43.                 LIDATA...................................17
  44.                 LINNUM...................................17
  45.                 MODEND...................................17
  46.                 PUBDEF...................................17
  47.                 SEGDEF...................................18
  48.     How ELINK works......................................18
  49.     Segment combining rules..............................18
  50. Input....................................................20
  51. Output...................................................21
  52.     Errors...............................................21
  53.     Warnings.............................................21
  54.     Map file.............................................21
  55. Output (continued)
  56.         Parameter List...................................21
  57.         File List........................................22
  58.         Segment Map......................................22
  59.         Symbol Lists.....................................22
  60.     Verbose mode.........................................22
  61.     Output file..........................................23
  62.         Intel Hex........................................23
  63.         Intel Hex32......................................23
  64.         Motorola S-records...............................24
  65.         OMF..............................................24
  66.     Merging output files.................................24
  67.     Return values........................................25
  68. The ELINK command line...................................26
  69.     How ELINK reads its command line.....................26
  70.     The ELINK command line: an example...................27
  71.     Switches.............................................28
  72.         -CASE............................................28
  73.         -COMBINE.........................................28
  74.         -COMMENT.........................................28
  75.         -DUPERR..........................................28
  76.         -DUPOK...........................................28
  77.         -ERR.............................................28
  78.         -FLAT............................................29
  79.         -HEX.............................................29
  80.         -HEX32...........................................29
  81.         -LINE............................................29
  82.         -MAP.............................................29
  83.         -NO32............................................29
  84.         -NOADDRESS.......................................29
  85.         -NOALPHA.........................................29
  86.         -NOFILES.........................................30
  87.         -NOLINE..........................................30
  88.         -NOPARMS.........................................30
  89.         -NOSEGMAP........................................30
  90.         -NOWARNING.......................................30
  91.         -OFFSET..........................................30
  92.         -OMF.............................................30
  93.         -RELAXED.........................................30
  94.         -SRECORD.........................................31
  95.         -VERBOSE.........................................31
  96.         -WARNING.........................................31
  97. Appendix A: Error Messages...............................32
  98. Appendix B: Warnings.....................................38
  99. Index....................................................39
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.                                 Page 2
  112.  
  113.  
  114.                                 ELINK
  115.  
  116. ELINK is an Embedded systems LINKer.  Its purpose is to link object
  117. files into a form suitable for embedded systems, particularly for
  118. firmware.
  119.  
  120. What makes ELINK different from the other linkers in the marketplace
  121. is that it creates binary images suitable for burning into ROM's
  122. directly from object files, it can handle the Intel 80386's and
  123. 80486's 32-bit code, and it can link together 32-bit object files
  124. created by both PharLap and Microsoft.
  125.  
  126. To understand this, it is necessary to understand what a linker does,
  127. how object files are constructed, and how PharLap and Microsoft have
  128. taken divergent paths to extend object files to handle 32-bit code.
  129.  
  130.                           What a linker does
  131.  
  132. In the beginning are the source files, the form (allegedly) readable
  133. by humans.  The source files are translated by compilers and
  134. assemblers (collectively called language translators) into object
  135. files.  The object files, in the Intel world, contain information
  136. about the data and executable code, derived from the source files.
  137. This information includes the names of external references, the names
  138. of public symbols, the names and attributes of the segments and
  139. groups, and the code itself.  In the case where references were made
  140. to objects external to the source file, there is also information
  141. pertaining to how those references are to be resolved.  The linker
  142. takes this information in, matches up the externals to the publics,
  143. resolves the external references, generates the binary code, and
  144. creates a new file containing the linked code and data.
  145.  
  146. In the DOS world, the linker's output is usually an executable
  147. program.  That program still contains references that aren't resolved,
  148. as they pertain to absolute addresses that can't be determined until
  149. DOS loads the program into memory.  At that time, those addresses are
  150. calculated.  ELINK resolves those addresses as well, on the theory
  151. that if the code and data are going to be burned into ROM's, you, the
  152. programmer, already know exactly where the code is going to start.
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.                                 Page 3
  170.  
  171.  
  172.                    How object files are constructed
  173.  
  174. The object files created by Microsoft-compatible and PharLap-
  175. compatible language translators are a subset of Intel's 8086
  176. Relocatable Object Module Format, or OMF for short.  Each object file
  177. is made up of object records.  Each object record follows a common
  178. format: a single byte, which identifies the type of record, a two-byte
  179. word, which is a count of the bytes in the record, the bytes making up
  180. the record, and a single byte checksum.  Also common to the object
  181. records are these rules:
  182.  
  183. ∙    Numbers are stored in standard Intel format: least significant
  184.      byte first, then next least, and so on.
  185.  
  186. ∙    Indices are the exception to this rule.  Indices between 0000 and
  187.      007F are stored as a single byte.  Indices between 0080 and 7FFF
  188.      are stored most significant byte first, then least significant
  189.      byte.  The first byte is stored with its most significant bit set
  190.      as a flag that the index is two bytes.
  191.  
  192. ∙    Names are stored with a single byte holding the character count
  193.      followed by the symbols of the name.  Thus "ELINK" would be
  194.      stored as 05 45 4C 49 4E 4B.
  195.  
  196. Here is a list of the record types ELINK recognizes and a short
  197. description of each record:
  198.  
  199. BLKDEF
  200.  
  201. +--------------------------------------------------+
  202. |7A|RLEN|BLK BASE|BLK INFO|PROC INFO|TYPE INDEX |CS|
  203. +-----------------------------------+-----------+--+
  204.                                     |Conditional|
  205.                                     +-----------+
  206.  
  207. The Block Definition Record contains information about procedures
  208. defined in the source file.  ELINK skips over this record, but does
  209. verify that the checksum is correct.  The information contained in
  210. this record has no relevance to the linking process, but is provided
  211. by the language translator for debugging purposes.
  212.  
  213. BLKEND
  214.  
  215. +----------+
  216. |7C|RLEN|CS|
  217. +----------+
  218.  
  219. The Block End Record provides information about the scope of variables
  220. and procedures in the source file.  ELINK skips over this record, but
  221. does verify that the checksum is correct.  The information contained
  222. in this record has no relevance to the linking process, but is
  223. provided by the language translator for debugging purposes.
  224.  
  225.  
  226.  
  227.                                 Page 4
  228.  
  229.  
  230. COMENT
  231.  
  232. +-------------------------------+
  233. |88|RLEN|COMMENT TYPE|COMMENT|CS|
  234. +-------------------------------+
  235.  
  236. The Comment Record allows language translators to include commentary,
  237. often proprietary, information in the object files.  One particular
  238. form of this record is the cornerstone to PharLap's 32-bit OMF
  239. extension scheme.  More on that later.  ELINK reads and decodes this
  240. record just enough to see if it's the PharLap 32-bit comment record.
  241. Other than that, it is skipped and the checksum verified.
  242.  
  243. DEBSYM
  244.  
  245. +---------------------------------------------------+
  246. |7E|RLEN|FRAME INFO|SYMBOL NAME|OFFSET|TYPE INDEX|CS|
  247. +------------------+-----------------------------+--+
  248.                    |           Repeated          |
  249.                    +-----------------------------+
  250.  
  251. The Debug Symbols Record provides information about local symbols
  252. including stack and based symbols.  ELINK skips over this record, but
  253. does verify that the checksum is correct.  The information contained
  254. in this record has no relevance to the linking process, but is
  255. provided by the language translator for debugging purposes.
  256.  
  257. EXTDEF
  258.  
  259. +-----------------------------------+
  260. |8C|RLEN|EXTERNAL NAME|TYPE INDEX|CS|
  261. +-------+------------------------+--+
  262.         |        Repeated        |
  263.         +------------------------+
  264.  
  265. The External Names Definition Record is used to provide a list of
  266. external names and what type of object each is.  ELINK will match each
  267. name in the list with an identical public name, if found.  Unlike most
  268. linkers, ELINK does not enforce the matching requirement if no
  269. reference to a given external name is found in the object module.  In
  270. other words, if FOO is declared external, but is not used, most
  271. linkers will insist that FOO be declared and defined somewhere.  ELINK
  272. doesn't.  ELINK doesn't attempt to enforce the type checking referred
  273. to in the type index, as every language translator I've encountered
  274. leaves a zero in the type index field, which means "the untyped type".
  275. If the language translator doesn't provide the information to perform
  276. type checking, the linker can't do it.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.                                 Page 5
  286.  
  287.  
  288. FIXUPP
  289.  
  290. +--------------------------+
  291. |9C|RLEN|THREAD or FIXUP|CS|
  292. +-------+---------------+--+
  293.         |   Repeated    |
  294.         +---------------+
  295.  
  296. The Fixup Record provides the information necessary to resolve
  297. references.  These records preserve the information about whether the
  298. reference is a single-byte displacement, a pointer with segment and
  299. offset, etc.  The THREAD fields are formatted as follows:
  300.  
  301. +-----------------------------+
  302. |TRD DAT|INDEX or FRAME NUMBER|
  303. +-------+---------------------|
  304.         |     Conditional     |
  305.         +---------------------+
  306.  
  307. The TRD DAT field is a single byte formatted as follows:
  308.  
  309. +------------+
  310. |0|D|0|MMM|TT|
  311. +------------+
  312.  
  313. Where D is the thread type (0 = target, 1 = frame), MMM is the method
  314. (T0 through T7 if a target thread, F0 through F6 if a frame thread),
  315. and TT is the thread number, 0 to 3.  The method identifies whether an
  316. index or a frame number follows, or if it follows, and if an index,
  317. what it is an index to.  These methods are:
  318.  
  319. T0:  The index is a segment index; a displacement will be used
  320. T1:  The index is a group index; a displacement will be used
  321. T2:  The index is an external index; a displacement will be used
  322. T3:  The following word is the frame; a displacement will be used
  323. T4:  The index is a segment index; no displacement
  324. T5:  The index is a group index; no displacement
  325. T6:  The index is an external index; no displacement
  326. T7:  The following word is the frame; no displacement
  327.  
  328. F0:  The index is a segment index
  329. F1:  The index is a group index
  330. F2:  The index is an external index
  331. F3:  The following word is a frame
  332. F4:  No index or frame word
  333. F5:  No index or frame word
  334. F6:  No index or frame word
  335.  
  336. Frame methods F3 and F6 and target methods T3 and T7 are not used by
  337. Microsoft or PharLap.
  338.  
  339.  
  340.  
  341.  
  342.  
  343.                                 Page 6
  344.  
  345.  
  346. A frame, by the way, is simply the segment part of the segment:offset
  347. address.  As you probably know, any 20-bit physical address can be
  348. expressed by any of 4,096 different segment:offset pairs.  The
  349. canonical frame, as Intel calls it, is the segment of the
  350. segment:offset pair with the smallest offset.  The frame of a segment
  351. or a group, as used in resolving the fixups, is the segment's or
  352. group's canonical frame.
  353.  
  354. The FIXUP field is formatted as follows:
  355.  
  356. +----------------------------------------------------------+
  357. |LOCAT|FIX DAT|FRAME DATUM|TARGET DATUM|TARGET DISPLACEMENT|
  358. +-------------+-----------+------------+-------------------|
  359.               |Conditional|Conditional |    Conditional    |
  360.               +--------------------------------------------+
  361.  
  362. The LOCAT field is a pair of bytes formatted as follows:
  363.  
  364. +--------------------+
  365. |1|M|0|LLL|OOOOOOOOOO|
  366. +--------------------+
  367.  
  368. Where M is the fixup mode (0 = self-relative, 1 = segment-relative),
  369. LLL is the type of fixup (000 = low byte, 001 = offset, 010 = base,
  370. 011 = pointer, 100 = high byte, 101 = loader-resolved offset, 110 and
  371. 111 are illegal.  PharLap does not support type 101 as described
  372. here), and OOOOOOOOOO is the offset in the previous LEDATA or LIDATA
  373. record that the fixup applies to.
  374.  
  375. The FIX DAT field is a byte formatted as follows:
  376.  
  377. +------------+
  378. |F|FRM|T|P|TG|
  379. +------------+
  380.  
  381. Where F is the frame specifier (0 = explicit frame, 1 = frame provided
  382. by a frame thread), FRM is the frame method (F0..F6 if an explicit
  383. frame is referenced, frame thread number 0..3 if a frame thread is
  384. referenced), T is the target specifier (0 = explicit target, 1 =
  385. target provided by a target thread), P is the primary field (0 =
  386. primary target, requires a displacement, or 1 = secondary, requires no
  387. displacement), and TG is the target method (T0..T7 if an explicit
  388. target is referenced (P is interpreted as the high-order bit), target
  389. thread 0..3 if a thread target is referenced).  Note that the frame
  390. and target threads defined by the THREAD fields provide a shorthand
  391. for the FIXUP fields that follow.
  392.  
  393. The FRAME DATUM field is a segment, group or external index or a
  394. frame; if the FIX DAT field references a frame thread or explicitly
  395. references frame methods F4, F5 or F6, this field is omitted.
  396.  
  397.  
  398.  
  399.  
  400.  
  401.                                 Page 7
  402.  
  403.  
  404. The TARGET DATUM field is a segment, group or external index or a
  405. frame; if the FIX DAT field references a target thread, this field is
  406. omitted.
  407.  
  408. The TARGET DISPLACEMENT field is the displacement referred to in the
  409. target methods T0 to T3.  It is present if the target thread or the
  410. explicit target method specify a primary target reference (a reference
  411. with displacement).
  412.  
  413. The frame method and target methods together are used to determine the
  414. segment and offset of the unresolved reference.  They are the heart
  415. and soul of the linker.
  416.  
  417. GRPDEF
  418.  
  419. +------------------------------------------------------+
  420. |9A|RLEN|GROUP NAME INDEX|GROUP COMPONENT DESCRIPTOR|CS|
  421. +------------------------+--------------------------+--+
  422.                          |         Repeated         |
  423.                          +--------------------------+
  424.  
  425. The Group Definition Record provides information about groups used in
  426. the module.  The GROUP COMPONENT DESCRIPTOR fields may be in any of
  427. the following five formats:
  428.  
  429. +----------------+
  430. |FF|SEGMENT INDEX|
  431. +----------------+
  432. +-----------------+
  433. |FE|EXTERNAL INDEX|
  434. +-----------------+
  435. +---------------------------------------------------------+
  436. |FD|SEGMENT NAME INDEX|CLASS NAME INDEX|OVERLAY NAME INDEX|
  437. +---------------------------------------------------------+
  438. +--------------------------------------------+
  439. |FB|LTL DAT|MAXIMUM GROUP LENGTH|GROUP LENGTH|
  440. +--------------------------------------------+
  441. +----------------------+
  442. |FA|FRAME NUMBER|OFFSET|
  443. +----------------------+
  444.  
  445. Of these five, only the first is used by Microsoft or PharLap, and
  446. only the first format is supported by ELINK.
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                 Page 8
  460.  
  461.  
  462. LEDATA
  463.  
  464. +--------------------------------------------------------+
  465. |A0|RLEN|SEGMENT INDEX|ENUMERATED DATA OFFSET|  DATA  |CS|
  466. +--------------------------------------------+--------+--+
  467.                                              |Repeated|
  468.                                              +--------+
  469.  
  470. The Logical Enumerated Data Record, contains the bulk of the code and
  471. data created by the language translator.  The record is limited to
  472. 1024 bytes of enumerated bytes of data.  Oddly enough, that happens to
  473. be the limit of what the 10-bit offset field of a FIXUPP record's
  474. LOCAT field can index.
  475.  
  476. LIDATA
  477.  
  478. +-------------------------------------------------------------+
  479. |A2|RLEN|SEG INDEX|ITERATED DATA OFFSET|ITERATED DATA BLOCK|CS|
  480. +--------------------------------------+-------------------+--+
  481.                                        |     Repeated      |
  482.                                        +-------------------+
  483.  
  484. The Logical Iterated Data Record contains the iterated code in a
  485. shorthand form.  The ITERATED DATA BLOCK fields are formatted as
  486. follows:
  487.  
  488. +--------------------------------+
  489. |REPEAT COUNT|BLOCK COUNT|CONTENT|
  490. +--------------------------------+
  491.  
  492. The REPEAT COUNT field is the count of how many times the following
  493. block(s) will be repeated.  The BLOCK COUNT field is a count of the
  494. ITERATED DATA BLOCK fields that will be in the CONTENT field.  If the
  495. BLOCK COUNT field is zero, the CONTENT field consists of a single byte
  496. holding the count of data bytes, followed by the data bytes
  497. themselves.  Not coincidentally, the recursive nature of this record
  498. mimics the recursive syntax of the assembly language DUP directive.
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.                                 Page 9
  518.  
  519.  
  520. LINNUM
  521.  
  522. +----------------------------------------------------------+
  523. |94|RLEN|LINE NUMBER BASE|LINE NUMBER|LINE NUMBER OFFSET|CS|
  524. +------------------------+------------------------------+--+
  525.                          |           Repeated           |
  526.                          +------------------------------+
  527.  
  528. The Line Numbers Record is used to provide a correspondence between
  529. the individual lines of a source file and the translated code.  The
  530. data recorded includes the LINE NUMBER BASE field (which group or
  531. segment the code is defined in), the LINE NUMBER fields, and the LINE
  532. NUMBER OFFSET fields (the offsets of the code relative to the start of
  533. the segment or group).  ELINK stores this information in files to
  534. which the -LINE switch applies and places it in the map file.  The
  535. LINE NUMBER BASE field is formatted exactly the same as the PUBLIC
  536. BASE field in the PUBDEF record.
  537.  
  538. LNAMES
  539.  
  540. +-------------------+
  541. |96|RLEN|  NAME  |CS|
  542. +-------+--------+--+
  543.         |Repeated|
  544.         +--------+
  545.  
  546. The List of Names Record is used to provide a list of the names of
  547. segments, groups, classes and overlays referenced in the module.
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.                                Page 10
  576.  
  577.  
  578. MODEND
  579.  
  580. +---------------------------------+
  581. |8A|RLEN|MOD TYPE|START ADDRESS|CS|
  582. +----------------+-------------+--+
  583.                  | Conditional |
  584.                  +-------------+
  585.  
  586. The Module End Record identifies the end of the module; it should be
  587. the last record in the file.  It also is used to identify a start
  588. address to the linker.  ELINK ignores that aspect of the record.  The
  589. MOD TYPE field is a single byte formatted as follows:
  590.  
  591. +----------+
  592. |MM|00000|L|
  593. +----------+
  594.  
  595. Where MM is either 00 (non-main module, no start address), 01 (non-
  596. main module with start address), 10 (main module, no start address) or
  597. 11 (main module with start address) and L is either 0 (the start
  598. address is a physical address) or 1 (the start address is a logical
  599. address requiring fixing up by the linker).  The START ADDRESS field
  600. is defined as follows:
  601.  
  602. +----------------------------------------------------+
  603. |END DAT|FRAME DATUM|TARGET DATUM|TARGET DISPLACEMENT|
  604. +-------+-----------+------------+-------------------|
  605.         |Conditional|Conditional |    Conditional    |
  606.         +--------------------------------------------+
  607.  
  608. for logical addresses, or
  609.  
  610. +-------------------+
  611. |FRAME NUMBER|OFFSET|
  612. +-------------------+
  613.  
  614. for physical addresses.  For a discussion of the logical address, see
  615. the description of the FIXUPP record.
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.                                Page 11
  634.  
  635.  
  636. PUBDEF
  637.  
  638. +-----------------------------------------------------------+
  639. |90|RLEN|PUBLIC BASE|PUBLIC NAME|PUBLIC OFFSET|TYPE INDEX|CS|
  640. +-------------------+------------------------------------+--+
  641.                     |              Repeated              |
  642.                     +------------------------------------+
  643.  
  644. The Public Names Definition Record is used to provide a list of public
  645. names.  These are the global or public symbols declared in the source
  646. files.  The data recorded include the PUBLIC BASE field (which
  647. describes which group or segment the name is defined in), the PUBLIC
  648. NAME fields, the PUBLIC OFFSET fields (which provide the offsets of
  649. the symbols relative to the start of the segment or group), and the
  650. TYPE INDEX fields (which are supposed to be indices of TYPDEF
  651. records).  These fields, except the TYPE INDEX fields, are recorded by
  652. ELINK for matching to external names.  These names are the names that
  653. will appear in the map file.  The public base is formatted as follows:
  654.  
  655. +--------------------------------------+
  656. |GROUP INDEX|SEGMENT INDEX|FRAME NUMBER|
  657. +-------------------------+------------|
  658.                           |Conditional |
  659.                           +------------+
  660.  
  661. The FRAME NUMBER field is present only if both the group index and the
  662. segment index are 0.
  663.  
  664. SEGDEF
  665.  
  666. +---------------------------------------------------------------+
  667. |98|RLEN|SEG ATTR|SEG LEN|SEG INDEX|CLASS INDEX|OVERLAY INDEX|CS|
  668. +------------------------+-----------------------------------+--+
  669.                          |            Conditional            |
  670.                          +-----------------------------------+
  671.  
  672. The Segment Definition Record describes a segment used in the module.
  673. Fields in other records that are described as segment indices refer to
  674. these records; segment index 1 refers to the first SEGDEF record,
  675. index 2 to the second, and so forth.  The mandatory fields are the
  676. SEGMENT ATTRIBUTE and SEGMENT LENGTH fields; the optional fields are
  677. indices to LNAMES records containing the segment's segment name (if
  678. any), class name (if any) and overlay name (if any).  The SEGMENT
  679. ATTRIBUTE field is formatted as follows:
  680.  
  681. +------------------------------------------------------------+
  682. |ACBP|FRAME NUMBER|OFFSET|LTL DAT|MAX SEG LENGTH|GROUP OFFSET|
  683. +----+-------------------+-----------------------------------|
  684.      |    Conditional    |            Conditional            |
  685.      +-------------------------------------------------------+
  686.  
  687.  
  688.  
  689.  
  690.  
  691.                                Page 12
  692.  
  693.  
  694. The ACBP field is a single byte formatted as follows:
  695.  
  696. +-----------+
  697. |AAA|CCC|B|0|
  698. +-----------+
  699.  
  700. Where AAA is the segment alignment (000 = absolute segment, 001 = byte
  701. aligned segment, 010 = word aligned segment, 011 = paragraph aligned
  702. segment, 100 = page aligned segment, 101 = unnamed absolute portion of
  703. memory, 110 = load-time locatable (LTL) paragraph-aligned segment; 111
  704. is undefined.  Microsoft and PharLap do not use 101 or 110 except in
  705. their 32-bit extensions), CCC is the combination attribute (000 =
  706. private, 001 = undefined, 010 = public, 011 = undefined, 100 = public,
  707. 101 = stack, 110 = common, 111 = public), and B is the big segment
  708. attribute (if 1, the segment length is exactly 65,536 bytes).  The
  709. FRAME NUMBER and OFFSET fields are present only if the segment
  710. alignment field is 000.  The LTL DAT, MAX SEG LENGTH and GROUP OFFSET
  711. fields are only present if the segment alignment is 110, which is not
  712. supported by Microsoft or PharLap.
  713.  
  714. THEADR
  715.  
  716. +----------------------+
  717. |80|RLEN|MODULE NAME|CS|
  718. +----------------------+
  719.  
  720. The T-Module Header Record provides the module name for the object
  721. file.  Object files should have only one module name.  ELINK uses this
  722. record to provide the module name in output files.
  723.  
  724. TYPDEF
  725.  
  726. +--------------------------------+
  727. |8E|RLEN|NAME|LEAF DESCRIPTORS|CS|
  728. +------------+----------------+--+
  729.              |    Repeated    |
  730.              +----------------+
  731.  
  732. The Type Definition Record is used to describe the types of objects
  733. described in PUBDEF, EXTDEF, BLKDEF and DEBSYM records.  While all the
  734. language translators I've used don't bother to provide meaningful type
  735. indices, some go to great lengths to provide TYPDEF record after
  736. TYPDEF record.  Because ELINK does no type checking, these records are
  737. verified but ignored.
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.                                Page 13
  750.  
  751.  
  752. Microsoft Enhancements to OMF
  753.  
  754. The following Microsoft enhancements to OMF are also supported:
  755.  
  756. COMDEF
  757.  
  758. +---------------------------------------------------------+
  759. |B0|RLEN|COMM NAME|TYPE INDEX|DATA SEG TYPE|COMM LENGTH|CS|
  760. +-------+----------------------------------------------+--+
  761.         |                   Repeated                   |
  762.         +----------------------------------------------+
  763.  
  764. The Communal Names Definition Record is used to list communal
  765. variables.  A communal variable is an uninitialized public variable
  766. whose size and location is undefined at the time of translation.  The
  767. DATA SEG TYPE field is a single byte and is either 61, indicating the
  768. communal variable is FAR (not in the default data segment), or 62,
  769. indicating the communal variable is NEAR (in the default data
  770. segment).  Near communal variables are placed in a segment called
  771. c_common in the group DGROUP; far communal variables are placed in a
  772. segment called FAR_BSS with the combine attribute of private.
  773.  
  774. LCOMDEF
  775.  
  776. +---------------------------------------------------------+
  777. |B8|RLEN|COMM NAME|TYPE INDEX|DATA SEG TYPE|COMM LENGTH|CS|
  778. +-------+----------------------------------------------+--+
  779.         |                   Repeated                   |
  780.         +----------------------------------------------+
  781.  
  782. The Local Communal Names Definition Record is used to list communal
  783. variables that have no visibility outside their module.  It is treated
  784. the same as a COMDEF record.
  785.  
  786. LEXTDEF
  787.  
  788. +-----------------------------------+
  789. |B4|RLEN|EXTERNAL NAME|TYPE INDEX|CS|
  790. +-------+------------------------+--+
  791.         |        Repeated        |
  792.         +------------------------+
  793.  
  794. The Local External Names Definition Record is used to provide a list
  795. of external names that are not visible outside their module.  It is
  796. treated the same as an EXTDEF record.
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.                                Page 14
  808.  
  809.  
  810. LPUBDEF
  811.  
  812. +-----------------------------------------------------------+
  813. |B6|RLEN|PUBLIC BASE|PUBLIC NAME|PUBLIC OFFSET|TYPE INDEX|CS|
  814. +-------------------+------------------------------------+--+
  815.                     |              Repeated              |
  816.                     +------------------------------------+
  817. or
  818.  
  819. +-----------------------------------------------------------+
  820. |B7|RLEN|PUBLIC BASE|PUBLIC NAME|PUBLIC OFFSET|TYPE INDEX|CS|
  821. +-------------------+------------------------------------+--+
  822.                     |              Repeated              |
  823.                     +------------------------------------+
  824.  
  825. The Local Public Names Definition Records are used to provide lists of
  826. public names that are not visible outside their modules.  They are
  827. treated the same as PUBDEF records.
  828.  
  829. 32-bit Enhancements to OMF
  830.  
  831. When the Intel 80386 CPU arrived on the scene, a problem arose: there
  832. was no way to express a 32-bit value in any of the OMF records.  How
  833. could one do that?  Well, as is so often the case in the DOS world,
  834. there arose not one, but two solutions!  Rather than debate which is
  835. better, ELINK can handle either set of extensions, and can handle a
  836. mixture of the two.
  837.  
  838. PharLap 32-bit Enhancements
  839.  
  840. PharLap offers a simple method of extending OMF to handle 32-bit
  841. records: it uses a special COMENT record to indicate that 32-bit
  842. extensions are used in the current module:
  843.  
  844. +--------------------------------+
  845. |88|08 00|80|AA|38 30 33 38 36|3D|
  846. +--------------------------------+
  847.  
  848. The "80386" COMENT record, if present in a module, modifies the
  849. following records:
  850.  
  851. FIXUPP
  852.  
  853. The TARGET DISPLACEMENT fields for primary targets are changed from 2
  854. bytes to 4 bytes.  The type of fixup field in the LOCAT field in the
  855. FIXUP field has 2 new values: 101 (32-bit offset) and 110 (48-bit
  856. pointer).
  857.  
  858. LEDATA
  859.  
  860. The ENUMERATED DATA OFFSET field is changed from 2 bytes to 4 bytes.
  861.  
  862.  
  863.  
  864.  
  865.                                Page 15
  866.  
  867.  
  868. LIDATA
  869.  
  870. The ITERATED DATA OFFSET field is changed from 2 bytes to 4 bytes.
  871.  
  872. LINNUM
  873.  
  874. The LINE NUMBER OFFSET fields are changed from 2 bytes to 4 bytes.
  875.  
  876. MODEND
  877.  
  878. The TARGET DISPLACEMENT field of the START ADDRESS field is changed
  879. from 2 bytes to 4 bytes.
  880.  
  881. PUBDEF
  882.  
  883. The PUBLIC OFFSET fields are changed from 2 bytes to 4 bytes.
  884.  
  885. SEGDEF
  886.  
  887. The SEGMENT LENGTH field is changed from 2 bytes to 4 bytes; the
  888. OFFSET field of the SEGMENT ATTRIBUTE field is changed from 2 bytes to
  889. 4 bytes.  2 new values are added for the segment alignment field of
  890. the ACBP field of the SEGMENT ATTRIBUTE field: 101 (segment is double-
  891. word aligned) and 110 (segment is 4K-page aligned).  An optional
  892. attribute byte may also be included following the OVERLAY INDEX field;
  893. it's formatted as follows:
  894.  
  895. +----------+
  896. |00000|U|AT|
  897. +----------+
  898.  
  899. Where U is the segment use attribute (0 = USE16, 1 = USE32) and AT is
  900. the segment access type (00 = RO [read-only], 01 = EO [execute-only],
  901. 10 = ER [execute/read], and 11 = RW [read/write]).
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.                                Page 16
  924.  
  925.  
  926. Microsoft 32-bit Enhancements
  927.  
  928. Microsoft's approach to 32-bit extensions to OMF was to create new
  929. record types.  With the exception of the LPUBDEF record, which can
  930. have a record type of B7, all the OMF records have even numbers for
  931. record types.  Microsoft created new records that are equivalent to
  932. existing records, with 1 added to the existing record's record type.
  933. The following new records were created:
  934.  
  935. FIXUPP
  936.  
  937. The record type is 9D; the TARGET DISPLACEMENT fields for primary
  938. targets are changed from 2 bytes to 4 bytes; the LOCAT field of the
  939. FIXUP field is redefined as follows:
  940.  
  941. +-------------------+
  942. |1|M|LLLL|OOOOOOOOOO|
  943. +-------------------+
  944.  
  945. The fields are unchanged except the LLLL field; this field supports
  946. the older types, as well as the following new values: 1001 (32-bit
  947. offset), 1011 (48-bit pointer), and 1101 (loader-resolved 32-bit
  948. offset).
  949.  
  950. LEDATA
  951.  
  952. The record type is A1; the ENUMERATED DATA OFFSET field is changed
  953. from 2 bytes to 4 bytes.
  954.  
  955. LIDATA
  956.  
  957. The record type is A3; the ITERATED DATA OFFSET field and REPEAT COUNT
  958. fields are changed from 2 bytes to 4 bytes.
  959.  
  960. LINNUM
  961.  
  962. The record type is 95; the LINE NUMBER OFFSET fields are changed from
  963. 2 bytes to 4 bytes.
  964.  
  965. MODEND
  966.  
  967. The record type is 8B; the TARGET DISPLACEMENT field of the START
  968. ADDRESS field is changed from 2 bytes to 4 bytes.
  969.  
  970. PUBDEF
  971.  
  972. The record type is 91; the PUBLIC OFFSET fields are changed from 2
  973. bytes to 4 bytes.
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.                                Page 17
  982.  
  983.      
  984. SEGDEF
  985.  
  986. The record type is 99; the ACBP field of the SEGMENT ATTRIBUTE is re-
  987. defined as follows:
  988.  
  989. +-----------+
  990. |AAA|CCC|B|X|
  991. +-----------+
  992.  
  993. As before, AAA is the segment alignment; the old alignments are
  994. honored, as is 101 (double-word alignment).  CCC is the combination
  995. attribute and is unchanged.  B is the big segment attribute; if set,
  996. it indicates a segment of 4,294,967,296 bytes (4Gb).  X is a new
  997. field; if 0, the segment has the USE16 attribute; if 1, it has the
  998. USE32 attribute.
  999.  
  1000. How ELINK works
  1001.  
  1002. Each object file and library file is read, in the order they're
  1003. encountered on the command line and in response files.  As each module
  1004. is read, its COMDEF, COMENT, EXTDEF, FIXUPP, GRPDEF, LEDATA, LIDATA,
  1005. LINNUM, LNAMES, MODEND, PUBDEF, SEGDEF and THEADR records are
  1006. translated into internal memory structures.  After the files have been
  1007. read in, the EXTDEF structures are matched against the PUBDEF
  1008. structures and "master" segments structures are created from the
  1009. individual modules' segment structures.  The master segment structures
  1010. are created in the order in which the module segment structures were
  1011. created; thus, the order of linkage is the order in which the segments
  1012. were described in the modules.  The module segment structures are then
  1013. tagged as to which master segment structure they belong to.  The map
  1014. file, if requested, is emitted at this point.  The files are then re-
  1015. read, in the same order as before, and the FIXUPP-directed actions are
  1016. applied to the associated LEDATA and LIDATA data, and the linked code
  1017. emitted.  The result of this is that the resulting linked file may
  1018. skip back and forth between one segment and another exactly as the
  1019. input modules did.
  1020.  
  1021. The rules for combining segments are as follows:
  1022.  
  1023. ∙    The segments must have the same segment name.  This cannot be
  1024.      overridden.
  1025.  
  1026. ∙    If one segment is part of a group, and another segment is not
  1027.      explicitly in any group, the segments may be combined.  If they
  1028.      are both in groups, the groups must have the same group name.
  1029.  
  1030. ∙    The segments must have the same class name.  If one segment does
  1031.      not have an explicit class name, but qualifies in all other ways
  1032.      for combinig with a segment that does have a class name, it may
  1033.      be combined with that segment if the -RELAXED switch is used.
  1034.  
  1035. ∙    The segments must have the same overlay names.  This is the only
  1036.      use ELINK makes of overlay information.
  1037.  
  1038.  
  1039.                                Page 18
  1040.  
  1041.  
  1042. ∙    The segments must have compatible combine types: public segments
  1043.      can only combine with other public segments, common segments can
  1044.      only combine with other common segments, stack segments can only
  1045.      combine with other stack segments.  Private segments cannot
  1046.      combine with any other segments.  A segment's combine type can be
  1047.      changed by using the -COMBINE switch.
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.                                Page 19
  1098.  
  1099.  
  1100.                                 Input
  1101.  
  1102. ELINK takes as its input multiple object and library files.  No
  1103. distinction need be made by the user, as the two types of files are
  1104. readily distinguished by ELINK.  The object files must be in the Intel
  1105. object module format (OMF) as described above; extensions to the Intel
  1106. OMF made by Microsoft and PharLap to support 80386 and 80486 32-bit
  1107. code as described above are also recognized.  The library files must
  1108. be Microsoft compatible.  ELINK has been successfully used to link
  1109. object and library files created by Microsoft, Borland, PharLap and
  1110. Metaware language translators, and has done so in a single session,
  1111. linking files created by all four translators at once.  The only
  1112. failure of note has been in handling Borland 80386 32-bit files
  1113. created by TASM.  Borland has chosen to reside in the Microsoft camp
  1114. as far as 32-bit extensions are concerned, but they don't support the
  1115. entire spectrum of those extensions.  Unfortunately, ELINK cannot
  1116. fully support TASM output because of this limitation.
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.                                Page 20
  1156.  
  1157.  
  1158.                                 Output
  1159.  
  1160. ELINK can create up to five different files as its output: an error
  1161. file, a warning file, a map file, a display file, and the true output
  1162. file (a file consisting of the successfully linked input files).
  1163.  
  1164. Errors
  1165.  
  1166. The error file is normally written to "stderr", which is usually the
  1167. console, and which can be redirected with a number of available
  1168. utilities.  Error output cannot be disabled altogether, but can be
  1169. redirected via the -ERR switch.
  1170.  
  1171. Appendix A is a list of the error messages output by ELINK, what they
  1172. mean, and what (if anything) you can do about them.
  1173.  
  1174. Warnings
  1175.  
  1176. The warning file, like the error file, is normally written to
  1177. "stderr".  Unlike errors, warnings can be disabled altogether, via the
  1178. -NOWARNING switch.  Warnings can be redirected via the -WARNING
  1179. switch.
  1180.  
  1181. Appendix B is a list of the warning messages output by ELINK, what
  1182. they mean, and what (if anything) you can do about them.
  1183.  
  1184. Map file
  1185. The map file is not normally created; it must be explicitly requested
  1186. by using the -MAP switch.  The map file output may be modified by use
  1187. of the -LINE, -NOADDRESS, -NOALPHA, -NOFILES, -NOLINE, -NOPARMS and
  1188. -NOSEGMAP switches.  The map file is broken down into five parts; each
  1189. part may be suppressed by use of the appropriate switch.
  1190.  
  1191. Parameter List
  1192.  
  1193. The parameter list is a list of the command line parameters read from
  1194. the command line and from response files, if any.  Two exceptions are
  1195. the -LINE and -NOLINE parameters; these parameters show up in the file
  1196. list, and will not show up if the file list is excluded by means of
  1197. the -NOFILES switch.  No distinction is made between the two sources.
  1198. The parameter list and the file list by themselves can be used to
  1199. create a response file, and for that reason are included in the map
  1200. file.  The -NOPARMS switch will disable inclusion of the parameter
  1201. list.
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.                                Page 21
  1214.  
  1215.  
  1216. File List
  1217.  
  1218. The file list is a list of the input files read from the command line
  1219. and from response files, if any.  The file list will also have the
  1220. switches -LINE and -NOLINE before each filename unless the -NOPARMS
  1221. switch is used.  No distinction is made between the two sources.  The
  1222. parameter list and the file list by themselves can be used to create a
  1223. response file, and for that reason are included in the map file.  The
  1224. -NOFILES switch will disable inclusion of the file list.
  1225.  
  1226. Segment Map
  1227.  
  1228. The segment map is a list of the segments, their group names (if any),
  1229. their combine types, their start addresses and their lengths.  The -
  1230. NOSEGMAP switch disables inclusion of the segment map.
  1231.  
  1232. Symbol Lists
  1233.  
  1234. The symbols are listed both alphabetically and by address.  Each list
  1235. contains the symbol name, its address, its group offset, the segment
  1236. and group the symbol is in, and the module it was defined in.  In
  1237. addition, the list sorted by address will contain the line number
  1238. information, if any.  The alphabetical list can be excluded by use of
  1239. the -NOALPHA switch, and the list sorted by address can be excluded by
  1240. use of the -NOADDRESS switch.  Unless both symbol lists are excluded,
  1241. a cross-reference will also be generated, giving the input file for
  1242. each module name.
  1243.  
  1244. In order to keep listings neat, overly long symbol names are truncated
  1245. to thirteen significant characters; truncated names may be identified
  1246. by the "+" following them.
  1247.  
  1248. Verbose mode
  1249.  
  1250. The display file is not normally created; it must be explicitly
  1251. requested by using the -VERBOSE switch.  The verbose output is written
  1252. to "stdout", which is usually the console, and can be redirected via
  1253. the DOS command line output redirection operator, ">", or the DOS
  1254. command line pipe operator, "|".  With a filename, verbose output is
  1255. written to the specified file.  In verbose mode, ELINK will produce
  1256. the following messages, in this order:
  1257.  
  1258. Pass1: reading filename  (for each input file)
  1259. Resolving external references
  1260. Combining segments
  1261. Creating map file
  1262. Beginning 2nd pass
  1263. Pass2: reading filename  (for each input file)
  1264. Memory use: value bytes
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.                                Page 22
  1272.  
  1273.  
  1274. Output file
  1275.  
  1276. The true output file, the result of linking the specified input files,
  1277. is by default Intel 16-bit hex.  It can also be Intel 32-bit hex,
  1278. Motorola S-records, or Intel OMF.  These formats are specified by
  1279. using the -HEX32, -OMF or -SRECORD switches.  The default filename for
  1280. the output file is the first input filename with an extension of
  1281. ".HEX".  If this is not desired, the -HEX, -HEX32, -OMF or -SRECORD
  1282. switches can be used to specify a different filename.
  1283.  
  1284. Intel Hex
  1285.  
  1286. Intel hex is an ASCII representation of the linked code.  All Intel
  1287. hex records are of the same general form:
  1288.  
  1289. +-----------------------------------------------+
  1290. |:|LENGTH|LOAD ADDRESS|RECORD TYPE|DATA|CHECKSUM|
  1291. +-----------------------------------------------+
  1292.  
  1293. The LENGTH field is a single byte indicating the number of bytes in
  1294. the DATA field.  The LOAD ADDRESS is a 16-bit value indicating the
  1295. load address offset for a data record; all other records fill this
  1296. field with 0.  The RECORD TYPE is a single byte indicating the type of
  1297. record.  The DATA field is 0 or more bytes of data.  The CHECKSUM
  1298. field is a two's complement sum of the bytes from the LENGTH field to
  1299. the DATA field.  Standard Intel hex record types are:
  1300.  
  1301. 00:  Data Record (code and data are here)
  1302. 01:  End of File Record
  1303. 02:  Extended Segment Address Record (the segment frame is here)
  1304. 03:  Start Segment Address Record (the start address frame is here)
  1305.  
  1306. Intel Hex32
  1307.  
  1308. Intel hex32 is an ASCII representation of 32-bit linked code.  It is
  1309. made up of the following Intel hex record types:
  1310.  
  1311. 00:  Data Record (code and data are here)
  1312. 01:  End of File Record
  1313. 04:  Extended Linear Address Record (the most significant word of the
  1314.      physical address is here)
  1315. 05:  Start Linear Address Record (the most significant word of the
  1316.      start physical address is here)
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.                                Page 23
  1330.  
  1331.  
  1332. Motorola S-records
  1333.  
  1334. Motorola S-records are an ASCII representation of 32-bit flat
  1335. (unsegmented) linked code.  It is formatted in the following fashion:
  1336.  
  1337. +---------------------- -------+
  1338. |S3|BB|AAAAAAAA|DD|DD|∙∙∙|DD|SS|
  1339. +---------------------- -------+
  1340.  
  1341. Where S3 is a signature indicating a 32-bit Motorola data record, BB
  1342. is the byte count in hexadecimal, AAAAAAAA is the 32-bit offset in
  1343. hexadecimal, DD are data bytes in hexadecimal, and SS is the checksum.
  1344. The byte count is the sum of the count of data bytes plus five (one
  1345. for the single-byte checksum and four for the four-byte address).  The
  1346. byte count, the four bytes of the address, the data bytes and the
  1347. checksum sum to 0FFH.
  1348.  
  1349. OMF
  1350.  
  1351. The OMF format is supported for downloading code into in-circuit
  1352. emulators (ICE).  It is for 16-bit code only.  The file format is very
  1353. similar to an object file, except that there are no FIXUPP records.
  1354.  
  1355. Merging output files
  1356.  
  1357. The error file, warning file, map file and display files may be merged
  1358. with one another by using the same filename with more than one of the
  1359. -ERR, -MAP, -VERBOSE or -WARNING switches.
  1360.  
  1361. The output file cannot have the same filename as the error, map,
  1362. display or warning files.
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.                                Page 24
  1388.  
  1389.  
  1390. Return values
  1391.  
  1392. The following values are returned by ELINK and can be tested for in a
  1393. batch file:
  1394. +--------------------------------------------------------------+
  1395. |Hex|Decimal|Meaning                                           |
  1396. |---+-------+--------------------------------------------------|
  1397. | 00|   0   |Normal return value                               |
  1398. |---+-------+--------------------------------------------------|
  1399. | 01|   1   |Warnings were generated                           |
  1400. |---+-------+--------------------------------------------------|
  1401. | 02|   2   |ELINK was invoked with no arguments               |
  1402. |---+-------+--------------------------------------------------|
  1403. | 80|  128  |Invalid parameter on command line                 |
  1404. |   |       |--------------------------------------------------|
  1405. |   |       |No files specified on command line                |
  1406. |---+-------+--------------------------------------------------|
  1407. | 81|  129  |Error occurred during pass 1                      |
  1408. |---+-------+--------------------------------------------------|
  1409. | 82|  130  |Error occurred while verifying external references|
  1410. |   |       |--------------------------------------------------|
  1411. |   |       |Error occurred while combining segments           |
  1412. |   |       |--------------------------------------------------|
  1413. |   |       |Error occurred while creating map file            |
  1414. |---+-------+--------------------------------------------------|
  1415. | 83|  131  |Conflicting output file requirements              |
  1416. |   |       |--------------------------------------------------|
  1417. |   |       |Error opening output file                         |
  1418. |   |       |--------------------------------------------------|
  1419. |   |       |Error closing output file                         |
  1420. |---+-------+--------------------------------------------------|
  1421. | 84|  132  |Error occurred during pass 2                      |
  1422. +--------------------------------------------------------------+
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.                                Page 25
  1446.  
  1447.  
  1448.                         The ELINK command line
  1449.  
  1450. ELINK allows the user to specify what files are to be linked and to
  1451. modify its behavior by specifying the input filenames and switches on
  1452. the DOS command line, inside response files, or both.
  1453.  
  1454. A response file is an ASCII text file that may contain the names of
  1455. files to be linked and switches to modify ELINK's behavior.  This is a
  1456. convenient way to specify a set of switches you commonly use, or a set
  1457. of files you want to link together, or both.  More than one response
  1458. file may be used.
  1459.  
  1460. Unlike many programs that use the command line or response files,
  1461. ELINK is largely unconcerned with the order of placement of filenames
  1462. and switches in the command line or response files.  There are
  1463. exceptions to this:
  1464.  
  1465. ∙    Files are linked in the order they appear in the command line and
  1466.      response files.
  1467.  
  1468. ∙    The -COMMENT switch affects subsequent response files.  If used
  1469.      within a response file, it affects subsequent lines within the
  1470.      current response file as well.
  1471.  
  1472. ∙    The -LINE and -NOLINE switches affect the processing of line
  1473.      number information in subsequent filenames.  If used within a
  1474.      response file, it affects subsequent filenames within the current
  1475.      response file as well.
  1476.  
  1477. ∙    When mutually contradictory switches are found in the ELINK
  1478.      command line, such as -DUPERR and -DUPOK, the conflict is
  1479.      silently resolved in favor of the last switch encountered.
  1480.  
  1481.                    How ELINK reads its command line
  1482.                                    
  1483. ELINK treats any command line parameter beginning with "-" as a
  1484. switch, any command line parameter beginning with "@" as the name of a
  1485. response file, and any other parameters as filenames.
  1486.  
  1487. A response file is a list of filenames and switches.  Switches and
  1488. filenames are distinguished as on the command line.  Response files
  1489. are not allowed within response files, however.  Each line of the
  1490. response file may contain one switch or one filename.  The filename or
  1491. switch does not have to start in any particular column.  Comments are
  1492. allowed inside response files.  By default, comments begin with a ";".
  1493. You can use the -COMMENT switch to change this.
  1494.  
  1495. All parameters are case-insensitive; -Case, -CASE, -case, etc, are all
  1496. equivalent.  The only exception to this is in switches used to modify
  1497. ELINK's behavior with respect to switches containing the names of
  1498. segments, classes, etc.  If case-sensitivity is specified, then those
  1499. names must be in the proper case.
  1500.  
  1501.  
  1502.  
  1503.                                Page 26
  1504.  
  1505.  
  1506.                   The ELINK command line: an example
  1507.  
  1508. Let's use the following ELINK command line as an example:
  1509.  
  1510. ELINK aa.bbb @cc.ddd -case ee.fff -noline @gg.hhh ii.jjj
  1511.  
  1512. aa.bbb is the name of a file to be linked.
  1513. cc.ddd is the name of a response file; it contains the following
  1514. lines:
  1515.  
  1516.  ;
  1517.  ; this is a comment
  1518.  ;
  1519.  kk.lll   ; deframmisizer
  1520.  mm.nnn   ; antikludge code
  1521.  
  1522.   -relaxed
  1523.  
  1524.  ;
  1525.  oo.ppp
  1526.  -comment=#
  1527.  
  1528. kk.lll is the name of a file to be linked, as is mm.mmm.
  1529. -relaxed is a switch.
  1530. oo.ppp is the name of another file to be linked.
  1531. -comment=# is a switch changing the response file comment character to
  1532. "#"
  1533.  
  1534. Back to the command line now...
  1535. -case is another switch
  1536. ee.fff is the name of a file to be linked.
  1537. -noline is a switch; further files will not have line number
  1538. information processed
  1539. gg.hhh is another response file; it contains the following lines:
  1540.  
  1541.  qq.rrr   #data
  1542.  ss.ttt   #code
  1543.  #uu.vvv
  1544.  -line
  1545.  
  1546. qq.rrr is the name of another file to be linked; so is ss.ttt.
  1547. -line is a switch; further files will have line number information
  1548. processed.
  1549. Note the use of "#" as a comment delimiter.
  1550.  
  1551. Finally, ii.jjj is the name of another file to be linked.
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.                                Page 27
  1562.  
  1563. So what does this mean?  ELINK will link the files aa.bbb, cc.ddd,
  1564. kk.lll, mm.nnn, oo.ppp, qq.rrr, ss.ttt and ii.jjj, in that order.
  1565. Line number information will be processed for all the files except
  1566. qq.rrr and ss.ttt, as dictated by the use of the -noline and -line
  1567. switches (line number information is processed by default).  Matching
  1568. of all symbols in all files will be case-sensitive, as dictated by the
  1569. -case switch, and all segments not formally placed in a group will be
  1570. combined with equivalent segments that are formally placed in a group,
  1571. as dictated by the -relaxed switch.
  1572.                                    
  1573.                                Switches
  1574.  
  1575. -CASE
  1576.  
  1577. By default, matching of names is case-insensitive.  Using this switch
  1578. makes name matching case-sensitive.
  1579.  
  1580. -COMBINE=name:[PRIVATE,PUBLIC,STACK,COMMON]
  1581.  
  1582. In order for two segments to be combined by ELINK, the segments must
  1583. have compatible combine types.  This switch allows the user to
  1584. override the language translator's choice for the specified segment.
  1585. This can be used to force segments together, or to force segments
  1586. apart.
  1587.  
  1588. -COMMENT
  1589.  
  1590. By default, response files use semicolons to delimit comments -
  1591. everything on a line to the right of the comment character is ignored
  1592. by ELINK.  This switch allows the user to choose a different
  1593. character.
  1594.  
  1595. -DUPERR
  1596.  
  1597. By default, multiply defined public names are viewed as an alarming
  1598. anomaly and ELINK generates a warning for each duplicate.  This switch
  1599. elevates the handling of this event to an error.
  1600.  
  1601. -DUPOK
  1602.  
  1603. By default, multiply defined public names are viewed as an alarming
  1604. anomaly and ELINK generates a warning for each duplicate.  This switch
  1605. causes ELINK to ignore this event.
  1606.  
  1607. -ERR=filename
  1608.  
  1609. By default, errors are written to "stderr", which is usually the
  1610. console, and which can be redirected with a number of available
  1611. utilities.  This switch eliminates the need to use such utilities by
  1612. allowing the user to specify the name of a file to which errors can be
  1613. written.
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.                                Page 28
  1620.  
  1621.  
  1622. -FLAT
  1623.  
  1624. By default, the data in each distinct segment and group begins at
  1625. offset 0; in flat mode, where the concept of separate segments and
  1626. groups exists primarily as a means to keep similar objects
  1627. (uninitialized data, constant data, code, etc.) together, offsets
  1628. continue to grow with each segment or group.  This is of use in non-
  1629. segmented architectures, such as the Intel 80386 or 80486 or the
  1630. Motorola CPUs.  The -SRECORD switch, used to create Motorola S-
  1631. records, implies this switch.
  1632.  
  1633. -HEX[=filename]
  1634.  
  1635. By default, ELINK's output is Intel 16-bit hex.  By itself, then, this
  1636. switch does nothing except affirm this.  With the optional filename,
  1637. the output filename is changed to the filename specified.
  1638.  
  1639. -HEX32[=filename]
  1640.  
  1641. By default, ELINK's output is Intel 16-bit hex.  By itself, this
  1642. switch changes the output format to Intel 32-bit hex.  With the
  1643. optional filename, the output filename is changed to the filename
  1644. specified.  It is an error to use this switch with -NO32.
  1645.  
  1646. -LINE
  1647.  
  1648. By default, line number information is processed for inclusion in the
  1649. map file.  This can be disabled by the -NOLINE switch and enabled by
  1650. this switch on a file-by-file basis.
  1651.  
  1652. -MAP=filename
  1653.  
  1654. By default, ELINK does not create a map file; this switch causes one
  1655. to be generated with the filename specified.
  1656.  
  1657. -NO32
  1658.  
  1659. By default, ELINK allows 32-bit code to be linked; this switch causes
  1660. a fatal error if 32-bit records are encountered.  It is an error to
  1661. use this switch with either -HEX32 or -SRECORD.
  1662.  
  1663. -NOADDRESS
  1664.  
  1665. By default, the map file contains a list of public symbols sorted by
  1666. address.  This switch disables inclusion of this list.
  1667.  
  1668. -NOALPHA
  1669.  
  1670. By default, the map file contains a list of public symbols sorted
  1671. alphabetically.  This switch disables inclusion of this list.
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.                                Page 29
  1678.  
  1679.  
  1680. -NOFILES
  1681.  
  1682. By default, the map file contains a list of files linked.  This switch
  1683. disables inclusion of this list.
  1684.  
  1685. -NOLINE
  1686.  
  1687. By default, line number information is processed for inclusion in the
  1688. map file.  This can be enabled by the -LINE switch and disabled by
  1689. this switch on a file-by-file basis.
  1690.  
  1691. -NOPARMS
  1692.  
  1693. By default, the map file contains a list of parameters used.  This
  1694. switch disables inclusion of this list.
  1695.  
  1696. -NOSEGMAP
  1697.  
  1698. By default, the map file contains a list of segments linked.  This
  1699. switch disables inclusion of this list.
  1700.  
  1701. -NOWARNING
  1702.  
  1703. By default, warnings are enabled.  This switch disables warning
  1704. generation.
  1705.  
  1706. -OFFSET=[CLASS,SEGMENT,OVERLAY]:name:offset
  1707.  
  1708. By default, the data in each distinct segment and group begins at
  1709. offset 0; in flat mode, where the concept of separate segments and
  1710. groups exists primarily as a means to keep similar objects
  1711. (uninitialized data, constant data, code, etc.) together, offsets
  1712. continue to grow with each segment or group.  This is of use in non-
  1713. segmented architectures, such as the Intel 80386 or 80486 or the
  1714. Motorola CPUs.  This switch allows the specified segment to begin at
  1715. the specified offset.
  1716.  
  1717. -OMF[=filename]
  1718.  
  1719. By default, ELINK's output is Intel 16-bit hex.  By itself, this
  1720. switch changes the output format to Intel OMF.  With the optional
  1721. filename, the output filename is changed to the filename specified.
  1722.  
  1723. -RELAXED
  1724.  
  1725. In order for two segments to be combined by ELINK, the segments must
  1726. have the same class name.  This switch allows ELINK to combine two
  1727. segments that are otherwise combinable, but one has a class name
  1728. defined, and the other does not.
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.                                Page 30
  1736.  
  1737.  
  1738. -SRECORD[=filename]
  1739.  
  1740. By default, ELINK's output is Intel 16-bit hex.  By itself, this
  1741. switch changes the output format to Motorola S-records.  With the
  1742. optional filename, the output filename is changed to the filename
  1743. specified.  As this format does not support a segmented architecture,
  1744. use of this switch implies -FLAT.  It is an error to use this switch
  1745. with -NO32.
  1746.  
  1747. -VERBOSE[=filename]
  1748.  
  1749. By default, verbose output is suppressed.  This switch, without a
  1750. filename, causes verbose output to be written to "stdout", which is
  1751. usually the console, and can be redirected via the DOS command line
  1752. output redirection operator, ">", or the DOS command line pipe
  1753. operator, "|".  With a filename, verbose output is written to the
  1754. specified file.
  1755.  
  1756. -WARNING=filename
  1757.  
  1758. By default, warnings are written to "stderr", which is usually the
  1759. console, and which can be redirected with a number of available
  1760. utilities.  This switch eliminates the need to use such utilities by
  1761. allowing the user to specify the name of a file to which warnings can
  1762. be written.
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.                                Page 31
  1794.  
  1795.  
  1796. Appendix A: Error Messages
  1797.  
  1798. 32-bit code detected, not allowed
  1799.      
  1800.      A 32-bit record was found in the first pass reading one of the
  1801.      object files.  You specified -NO32.  Either don't use the -NO32
  1802.      switch, or check the object file: you have 32-bit code where you
  1803.      weren't expecting it.
  1804.  
  1805. A1: Illegal index: count
  1806.      
  1807.      An attempt was made to add a segment's map to the combined
  1808.      segment map; the pointer to the current object file's data
  1809.      structure could not be found.  Memory has apparently been
  1810.      corrupted.  Verify that no TSR's are conflicting with ELINK and
  1811.      that no hardware memory errors could be causing the problem.
  1812.      Then contact the author.
  1813.  
  1814. A2: Illegal index: count
  1815.      
  1816.      An attempt was made to add a segment's map to the combined
  1817.      segment map; the segment index was out of range.  The object file
  1818.      may be corrupted or incompatible with ELINK or an error was made
  1819.      reading the file.  Check the file and verify that the file is
  1820.      completely readable.
  1821.  
  1822. Aborted
  1823.      
  1824.      There were unresolved references, a failure to combine the
  1825.      defined segments, or there were problems writing the map file
  1826.      out.  Previous error messages should indicate exactly what
  1827.      happened.
  1828.  
  1829. Can't delete old backup file filename
  1830.      
  1831.      The backup file created by ELINK previously cannot be deleted.
  1832.      The file is probably read-only.  Either rename the file or remove
  1833.      the read-only attribute.
  1834.  
  1835. Can't open filename for read
  1836.      
  1837.      The specified file could not be read.  The file does not
  1838.      apparently exist.  Check for a typo in the command line or
  1839.      response file.
  1840.  
  1841. Can't open filename for write
  1842.      
  1843.      The specified file could not be created.  Your disk is full or
  1844.      your system is corrupted.  Check your disk.
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.                                Page 32
  1852.  
  1853. Can't rename filename to filename
  1854.      
  1855.      ELINK has attempted to back up the old output file.  It could not
  1856.      be renamed.  Your system appears to be malfunctioning.
  1857.  
  1858. Can't use 2 error file
  1859.      
  1860.      You attempted to use -ERR twice to specify an error file.  Don't
  1861.      do that.
  1862.  
  1863. Can't use 2 map files
  1864.      
  1865.      You attempted to use -MAP twice to specify a map file.  Don't do
  1866.      that.
  1867.  
  1868. Can't use 2 output files
  1869.      
  1870.      You attempted to use -HEX, -HEX32, -OMF or -SRECORD twice or in
  1871.      combination to specify an output file.  Don't do that.
  1872.  
  1873. Can't use 2 warning files
  1874.      
  1875.      You attempted to use -WARNING twice to specify a warning file.
  1876.      Don't do that.
  1877.  
  1878. Conflicting output requirements
  1879.      
  1880.      You used the -NO32 switch with either the -HEX32 or -SRECORD
  1881.      switches.  You can't do that.
  1882.  
  1883. Error reading file
  1884.      
  1885.      A file read failed.  The file is corrupted or the disk system
  1886.      failed.
  1887.  
  1888. Error writing output file
  1889.      
  1890.      An error occurred while writing to a file.  The disk is full or
  1891.      the disk system is malfunctioning.
  1892.  
  1893. F1: Illegal index: count
  1894.      
  1895.      An attempt was made to look up a name in the current object
  1896.      file's data structure; the pointer to the current object file's
  1897.      data structure could not be found.  Memory has apparently been
  1898.      corrupted.  Verify that no TSR's are conflicting with ELINK and
  1899.      that no hardware memory errors could be causing the problem.
  1900.      Then contact the author.
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.                                Page 33
  1910.  
  1911. F2: Illegal index: count
  1912.      
  1913.      An attempt was made to look up a name in the current object
  1914.      file's data structure; the name index was out of range.  The
  1915.      object file may be corrupted or incompatible with ELINK or an
  1916.      error was made reading the file.  Check the file and verify that
  1917.      the file is completely readable.
  1918.  
  1919. Illegal combine override type: type
  1920.      
  1921.      An override of a segment's combine type was made with a combine
  1922.      type of other that COMMON, PRIVATE, PUBLIC or STACK.  Check your
  1923.      command line or response file for typo's.
  1924.  
  1925. Illegal count
  1926.      
  1927.      A byte count in a 16-bit segment exceeded 65,535.  One or more
  1928.      object files may be defective or incompatible with ELINK, or the
  1929.      language translator attempted to place more data in a segment
  1930.      than would fit.
  1931.  
  1932. Illegal offset
  1933.      
  1934.      A segment offset in excess of 65,535 was found in a 16-bit
  1935.      segment.  One or more object files may be defective or
  1936.      incompatible with ELINK, or the language translator attempted to
  1937.      place more data in a segment than would fit.
  1938.  
  1939. Illegal offset override type: type
  1940.      
  1941.      An offset override was attempted on an object other than a class,
  1942.      overlay or segment.  Check the command line or response files for
  1943.      a typo.
  1944.  
  1945. Illegal segmentation
  1946.      
  1947.      A non-zero segment frame was encountered in flat code.  Your code
  1948.      is segmented, but you specified -FLAT or -SRECORD (which implies
  1949.      -FLAT).  Check your source code.
  1950.  
  1951. Invalid group component descriptor value
  1952.      
  1953.      The Intel OMF standard lists 5 group component descriptors; only
  1954.      one, the segment index, is commonly supported by language
  1955.      translators.  This object file is not compatible with ELINK.
  1956.  
  1957. LEDATA record size out of range
  1958.      
  1959.      The Intel OMF standard states that a Logical Enumerated DATA
  1960.      (LEDATA) record cannot have a size field in excess of 1024 bytes.
  1961.      Either the object file is defective or is incompatible with
  1962.      ELINK.
  1963.  
  1964.  
  1965.  
  1966.  
  1967.                                Page 34
  1968.  
  1969. Memory allocation failed
  1970.      
  1971.      ELINK attempted to allocate memory unsuccessfully.  Try removing
  1972.      TSR's, make sure you're nut running out of a shell, etc.
  1973.  
  1974. No files specified
  1975.      
  1976.      You didn't specify any files to link...
  1977.  
  1978. Object file filename, module name: Cannot find reference to name
  1979.      
  1980.      The specified module has an external reference that cannot be
  1981.      resolved.  Check your source files for typo's.
  1982.  
  1983. Overrun
  1984.      
  1985.      The data being written wrapped at the top of the segment.  Check
  1986.      your code; you have too much data in one of your segments, or you
  1987.      have too many ORG directives.
  1988.  
  1989. Pass1: abnormal termination of filename read
  1990.      
  1991.      The file being read was stopped during the first pass.  A
  1992.      previous error message should be more specific.
  1993.  
  1994. Pass1: bad checksum: value, record type value
  1995.      
  1996.      The file being read contained a bad checksum in one of its
  1997.      records.  The object file is corrupt or incompatible with ELINK.
  1998.  
  1999. Pass1: error reading file filename
  2000.      
  2001.      A file read failed.  The file is corrupted or the disk system
  2002.      failed.
  2003.  
  2004. Pass1: error reading library file filename
  2005.      
  2006.      A file read failed.  The file is corrupted or the disk system
  2007.      failed.
  2008.  
  2009. Pass1: error seeking in library file filename
  2010.      
  2011.      During an attempt to read the next module in the specified
  2012.      library file, the seek to the start of the next module failed.
  2013.      The library file is corrupt, incompatible with ELINK, or the disk
  2014.      system is malfunctioning.
  2015.  
  2016. Pass1: seek past library file filename index block
  2017.      
  2018.      During an attempt to read the next module in the specified
  2019.      library file, the address of the next module was calculated to be
  2020.      past the library file's index block.  The library file is
  2021.      corrupt, incompatible with ELINK, or the disk system is
  2022.      malfunctioning.
  2023.  
  2024.  
  2025.                                Page 35
  2026.  
  2027.  
  2028. Pass2: abnormal termination of filename read
  2029.      
  2030.      The file being read was stopped during the second pass.  A
  2031.      previous error message should be more specific.
  2032.  
  2033. Pass2: bad checksum: value
  2034.      
  2035.      The file being read contained a bad checksum in one of its
  2036.      records.  The object file is corrupt or incompatible with ELINK.
  2037.      This is more serious than the pass 1 message, as the file read
  2038.      without error on the first pass.
  2039.  
  2040. Pass2: error reading file filename
  2041.      
  2042.      A file read failed.  The file is corrupted or the disk system
  2043.      failed.  This is more serious than the pass 1 message, as the
  2044.      file read without error on the first pass.
  2045.  
  2046. Pass2: error reading library file filename
  2047.      
  2048.      A file read failed.  The file is corrupted or the disk system
  2049.      failed.  This is more serious than the pass 1 message, as the
  2050.      file read without error on the first pass.
  2051.  
  2052. Pass2: error seeking in library file filename
  2053.      
  2054.      During an attempt to read the next module in the specified
  2055.      library file, the seek to the start of the next module failed.
  2056.      The library file is corrupt, incompatible with ELINK, or the disk
  2057.      system is malfunctioning.  This is more serious than the pass 1
  2058.      message, as the file read without error on the first pass.
  2059.  
  2060. Pass2: seek past library file filename index block
  2061.      
  2062.      During an attempt to read the next module in the specified
  2063.      library file, the address of the next module was calculated to be
  2064.      past the library file's index block.  The library file is
  2065.      corrupt, incompatible with ELINK, or the disk system is
  2066.      malfunctioning.  This is more serious than the pass 1 message, as
  2067.      the file read without error on the first pass.
  2068.  
  2069. S1: Illegal index: count
  2070.      
  2071.      An attempt was made to log a reference to an external symbol in
  2072.      the current object file's data structure; the pointer to the
  2073.      current object file's data structure could not be found.  Memory
  2074.      has apparently been corrupted.  Verify that no TSR's are
  2075.      conflicting with ELINK and that no hardware memory errors could
  2076.      be causing the problem.  Then contact the author.
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.                                Page 36
  2084.  
  2085. S2: Illegal index: count
  2086.      
  2087.      An attempt was made to log a reference to an external symbol in
  2088.      the current object file's data structure; the name index was out
  2089.      of range.  The object file may be corrupted or incompatible with
  2090.      ELINK or an error was made reading the file.  Check the file and
  2091.      verify that the file is completely readable.
  2092.  
  2093. Symbol name in module name also defined in module name
  2094.      
  2095.      The symbol was declared public in two different modules; the
  2096.      -DUPERR switch was specified on the command line or in a response
  2097.      file, making this an error.  Fix the files or don't use the
  2098.      -DUPERR switch.
  2099.  
  2100. Unrecognized parameter -switch
  2101.      
  2102.      The specified switch is not recognized.  Check the command line
  2103.      or response files for a typo.
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.                                Page 37
  2142.  
  2143.  
  2144. Appendix B: Warnings
  2145.  
  2146. Frame error
  2147.      
  2148.      This is a result of a self-relative fixup attempted on an object
  2149.      that is one frame relative to an object in another frame.  This
  2150.      is usually a result of the language translator acting under the
  2151.      assumption that the objects were in the same frame.  Check that
  2152.      the objects are in the matching segments and re-translate or use
  2153.      the -RELAXED or -COMBINE switches.
  2154.  
  2155. GET_FIXDAT FAILURE
  2156.      
  2157.      The object file being linked is not compatible with ELINK or is
  2158.      corrupted.
  2159.  
  2160. Object file filename has more than one module name
  2161.      
  2162.      Object files are only supposed to contain one module name.  The
  2163.      object file may not be compatible with ELINK.
  2164.  
  2165. Segment CLASS:name OVERLAY:name SEGMENT:name in more than one group
  2166.      
  2167.      More than one group contains the specified segment.  Check the
  2168.      source and remove the inappropriate grouping.
  2169.  
  2170. Symbol name in module name also defined in module name
  2171.      
  2172.      The symbol was declared public in two different modules.  Fix the
  2173.      files or use the -DUPOK switch.
  2174.  
  2175. Symbol name in module name, file filename declared external but not
  2176.      used
  2177.      
  2178.      The specified symbol is declared external in the specified
  2179.      module, but there is no reference to it.  This is usually due to
  2180.      modified source files that used to refer to the symbol, but no
  2181.      longer do, and still have the reference declared external.  Some
  2182.      language translators use the trick of generating external
  2183.      definition records that aren't referenced for the purpose of
  2184.      forcing the linker to include startup code, library objects, etc.
  2185.      ELINK is not bound to include such code.
  2186.  
  2187. Unknown module type value, offset value
  2188.      
  2189.      A module record of the specified type, at the specified value, is
  2190.      not recognized by ELINK.  This object file may not be compatible
  2191.      with ELINK.
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.                                Page 38
  2200.  
  2201.  
  2202.                                 Index
  2203.  
  2204. -CASE  27, 28
  2205.   example  27
  2206.   usage  28
  2207. -COMBINE  19, 28, 34, 38
  2208.   syntax  28
  2209.   usage  28
  2210. -COMMENT  26, 27, 28
  2211.   example  27
  2212.   order of placement  26
  2213.   usage  28
  2214. -DUPERR  26, 28, 37
  2215.   usage  28
  2216. -DUPOK  26, 28, 38
  2217.   usage  28
  2218. -ERR  21, 24, 28, 33
  2219.   syntax  28
  2220.   usage  28
  2221. -FLAT  29, 31, 34
  2222.   usage  29
  2223. -HEX  23, 29, 33
  2224.   syntax  29
  2225.   usage  29
  2226. -HEX32  23, 29, 33
  2227.   inconsistent with other switches  29, 33
  2228.   syntax  29
  2229.   usage  29
  2230. -LINE  10, 21, 22, 26, 27, 29, 30
  2231.   example  27
  2232.   order of placement  26
  2233.   usage  29
  2234. -MAP  24, 29, 33
  2235.   syntax  29
  2236.   usage  29
  2237. -NO32  29, 31, 32, 33
  2238.   inconsistent with other switches  29, 33
  2239.   usage  29
  2240. -NOADDRESS  21, 22, 29
  2241.   usage  29
  2242. -NOALPHA  21, 22, 29
  2243.   usage  29
  2244. -NOFILES  21, 22, 30
  2245.   usage  30
  2246. -NOLINE  21, 22, 26, 27, 29, 30
  2247.   example  27
  2248.   order of placement  26
  2249.   usage  30
  2250. -NOPARMS  21, 22, 30
  2251.   usage  30
  2252. -NOSEGMAP  21, 22, 30
  2253.   usage  30
  2254.  
  2255.  
  2256.  
  2257.                                Page 39
  2258.  
  2259. -NOWARNING  21, 30
  2260.   usage  30
  2261. -OFFSET  30, 34
  2262.   syntax  30
  2263.   usage  30
  2264. -OMF  23, 30, 33
  2265.   syntax  30
  2266.   usage  30
  2267. -RELAXED  18, 27, 30, 38
  2268.   example  27
  2269.   usage  30
  2270. -SRECORD  23, 29, 31, 33, 34
  2271.   and -FLAT  29, 31, 34
  2272.   inconsistent with other switches  31, 33
  2273.   syntax  31
  2274.   usage  31
  2275. -VERBOSE  22, 24, 31
  2276.   syntax  31
  2277.   usage  31
  2278. -WARNING  21, 24, 31, 33
  2279.   syntax  31
  2280.   usage  31
  2281. 32-bit code  3, 29
  2282.   -NO32  29
  2283.   default  29
  2284. 80386  3, 29, 30, 31
  2285.   flat memory model  29, 30, 31
  2286. 80486  3, 29, 30
  2287. Command line  25, 26-28
  2288.   example  27-28
  2289.   parameters  26
  2290.     case sensitivity  26
  2291.     order of placement  26
  2292.       -COMMENT  26
  2293.       -LINE  26
  2294.       -NOLINE  26
  2295. Errors  21, 25, 28, 29, 32-37
  2296.   32-bit code  29, 32
  2297.   abort  32
  2298.   combine type  34
  2299.   conflicting switches  33
  2300.   default output device  21, 28
  2301.   duplicated switches  33
  2302.     -ERR  33
  2303.     -HEX,-HEX32,OMF,-SRECORD  33
  2304.     -MAP  33
  2305.     -WARNING  33
  2306.   group component descriptor  34
  2307.   i/o  32, 33, 35, 36
  2308.   illegal index  32, 33, 34, 36, 37
  2309.   library files  35, 36
  2310.   memory allocation  35
  2311.   multiply defined public names  28, 37
  2312.   offset override  34
  2313.  
  2314.  
  2315.                                Page 40
  2316.  
  2317. Errors (continued)
  2318.   overrun  35
  2319.   pass1  35
  2320.     abnormal termination  35
  2321.     bad checksum  35
  2322.   pass2  36
  2323.     abnormal termination  36
  2324.     bad checksum  36
  2325.   redirection  21, 28
  2326.   return values  25
  2327.   segmentation  34
  2328.   unrecognized parameters  37
  2329.   unresolved references  32, 35
  2330.   values out of range  34
  2331. Fixups  6-8, 9, 15, 17, 38
  2332.   load-time  3
  2333.   methods  6, 7, 8
  2334.     frame  6, 7, 8
  2335.     target  6, 7, 8
  2336.   modes  7
  2337.     segment-relative  7
  2338.     self-relative  7
  2339.   threads  6, 7
  2340.   types  7, 15, 17
  2341. Frames  7
  2342. Input  20
  2343.   library files  20
  2344.   object files  20
  2345. Input filenames  26
  2346. Line numbers  28, 29, 30
  2347.   -LINE and -NOLINE  29, 30
  2348.   default processing  28, 29, 30
  2349. Map file  21-22, 29, 30
  2350.   creation  21, 29
  2351.   default  21, 29
  2352.   file list  22, 30
  2353.     -LINE and -NOLINE  22
  2354.   parameter list  21, 30
  2355.     -LINE and -NOLINE  21
  2356.   segment map  22, 30
  2357.   symbol lists  22, 29, 30
  2358.     alphabetical  22, 29
  2359.     by address  22, 29
  2360.     line numbers  22, 29, 30
  2361.     module cross-reference  22
  2362.     name truncation  22
  2363. Motorola processors  29, 30, 31
  2364. Names  5, 10, 12, 13, 28, 37, 38
  2365.   class  10
  2366.   external  5
  2367.   group  10
  2368.   matching  28
  2369.     case sensitivity  28
  2370.       -CASE  28
  2371.  
  2372.  
  2373.                                Page 41
  2374.  
  2375. Names (continued)
  2376.       default  28
  2377.   module  13, 38
  2378.   publics  12, 28, 37, 38
  2379.     multiply defined  28, 37, 38
  2380.       default behavior  28
  2381.   segment  10
  2382. OMF  3-18, 20, 34
  2383.   BLKDEF  4, 13
  2384.   BLKEND  4
  2385.   COMENT  5, 15, 18
  2386.   communal variables  14
  2387.   conventions  4
  2388.   DEBSYM  5, 13
  2389.   enhancements  3, 5, 14-18, 20
  2390.     16-bit  14-15, 18
  2391.       COMDEF  14, 18
  2392.       LCOMDEF  14
  2393.       LEXTDEF  14
  2394.       LPUBDEF  15
  2395.     32-bit  3, 5, 15-18, 20
  2396.       Borland  20
  2397.       Microsoft  3, 17-18, 20
  2398.       PharLap  3, 5, 15-16, 20
  2399.   EXTDEF  5, 13, 14, 18
  2400.   FIXUPP  6-8, 11, 15, 17, 18
  2401.   GRPDEF  8, 18, 34
  2402.     group component descriptors  8, 34
  2403.   LEDATA  7, 9, 15, 17, 18, 34
  2404.   LIDATA  7, 9, 16, 17, 18
  2405.   LINNUM  10, 16, 17, 18
  2406.   LNAMES  10, 12, 18
  2407.   MODEND  11, 16, 17, 18
  2408.   PUBDEF  10, 12, 13, 15, 16, 17, 18
  2409.   SEGDEF  12, 13, 16, 18
  2410.   THEADR  13, 18
  2411.   TYPDEF  13
  2412. Output  21, 23-24, 29, 30, 31
  2413.   filename  23, 24, 29, 30, 31
  2414.     -HEX  23, 29
  2415.     -HEX32  23, 29
  2416.     -OMF  23, 30
  2417.     -SRECORD  23, 31
  2418.     merging files  24
  2419.   format  23, 24, 29, 30, 31
  2420.     default  23, 29, 30, 31
  2421.     Intel 16-bit hex  23, 29
  2422.     Intel 32-bit hex  23, 29
  2423.     Intel OMF  23, 24, 30
  2424.     Motorola S-records  23, 24, 31
  2425. Overlays  18
  2426. Response files  26, 27, 28
  2427.   comments  26, 28
  2428.     -COMMENT  28
  2429.  
  2430.  
  2431.                                Page 42
  2432.  
  2433. Response files (continued)
  2434.     default character  26, 28
  2435.   defined  26
  2436.   example  27
  2437.   how recognized  26
  2438.   recursion  26
  2439. Return values  25
  2440. Segments  13, 16, 18-19, 28, 29, 30, 34, 38
  2441.   access type  16, 18
  2442.   alignment  13, 16, 18
  2443.   big segment attribute  13, 18
  2444.   combine types  13, 19, 28
  2445.     -COMBINE  28
  2446.     default  28
  2447.   combining rules  18-19, 30, 34
  2448.     class names  18, 30
  2449.       -RELAXED  18, 30
  2450.       default  18, 30
  2451.     combine type  19, 34
  2452.     group names  18
  2453.     overlay names  18
  2454.     segment names  18
  2455.   groups  38
  2456.   order of linkage  18
  2457.   starting offsets  29, 30
  2458.     -FLAT  29
  2459.     -OFFSET  30
  2460.     default behavior  29, 30
  2461.   USE16  16, 18
  2462.   USE32  16, 18
  2463. Switches  26, 28-31, 37
  2464.   how recognized  26
  2465.   invalid switches  37
  2466.   resolution of contradictory switches  26
  2467. Verbose mode  21, 22, 31
  2468.   -VERBOSE  22, 31
  2469.   default  22, 31
  2470. Warnings  21, 25, 28, 30, 31, 38
  2471.   default output device  21, 31
  2472.   disabling  21, 30
  2473.   frame errors  38
  2474.   get_fixdat failure  38
  2475.   multiple module names  38
  2476.   multiply defined public names  28, 38
  2477.   redirection  21, 31
  2478.   return value  25
  2479.   segment in multiple groups  38
  2480.   unrecognized module type  38
  2481.   unused externals  38
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.                                Page 43
  2490.